package com.denlaku.longan.service.impl;

import com.denlaku.longan.BizModule;
import com.denlaku.longan.anno.RequiredTx;
import com.denlaku.longan.repository.DataSetFieldRepository;
import com.denlaku.longan.service.DataSetFieldService;
import com.denlaku.longan.util.SnowflakeUtils;
import com.denlaku.longan.vo.DataSetField;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tianx
 */
@Service
public class DataSetFieldServiceImpl implements DataSetFieldService {
	@Autowired
	private DataSetFieldRepository dataSetFieldRepository;

	@Override
	@RequiredTx
	public int add(DataSetField field) {
		return dataSetFieldRepository.add(field);
	}

	@Override
	@RequiredTx
	public int delete(Long tenantId, Long dataSetId) {
		return dataSetFieldRepository.delete(tenantId, dataSetId);
	}

	@Override
	public List<DataSetField> list(Long tenantId, Long dataSetId) {
		return dataSetFieldRepository.list(tenantId, dataSetId);
	}
}
